package org.openmore.platform.wechatMp;

import me.chanjar.weixin.common.bean.menu.WxMenu;
import me.chanjar.weixin.mp.api.WxMpMessageRouter;
import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.bean.menu.WxMpMenu;
import me.chanjar.weixin.mp.bean.result.WxMpUser;
import org.springframework.ui.ModelMap;

public interface WechatMpService {

    WxMpService getWxService(String tenantId);
    WxMpMessageRouter getMpRouter(String tenantId);

    /**接收到来自微信服务器的认证消息*/
    String checkSignature(String tenantId, String signature, String timestamp, String nonce, String echostr);

    /**接收微信请求*/
    String handlePost(String tenantId, String requestBody, String signature, String timestamp, String nonce,
                      String openid, String encType, String msgSignature);

    /**获取授权身份信息*/
    WxMpUser greetUser(String tenantId, String code);

    /**创建按钮*/
    String menuCreate(String tenantId, WxMenu menu);

    /**自定义创建按钮*/
    String menuCreate(String tenantId, String menuJson);

    /**自定义菜单删除*/
    void menuDelete(String tenantId);

    /**删除个性化菜单按钮*/
    void menuDelete(String tenantId, String menuId);

    /**自定义菜单查询接口*/
    WxMpMenu menuGet(String tenantId);
}
